﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace Center
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        { 
            InitializeComponent();
            this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            DispatcherTimer timer = new DispatcherTimer();
            timer.Tick += timer_Tick;   
            timer.Start();
        }
        void timer_Tick(object sender, EventArgs e)
        {
            lbl_date.Content = DateTime.Now.Date.ToShortDateString();
             lbl_date_month.Content = DateTime.Now.Date.ToLongDateString().Remove(0,3).Remove(6).Replace(',',' ');
            lbl_clk.Content = DateTime.Now.ToLongTimeString();
        }

        private void mnu_stud_add_Click(object sender, RoutedEventArgs e)
        {
            Window win = new Window();
            win.Content =new stud_add();
            win.SizeToContent = System.Windows.SizeToContent.WidthAndHeight;
            win.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            win.ShowDialog();

        }



    }
}
